﻿using System;
using System.Collections.Generic;
using Slippor.Douban.Radio.Filter;

namespace Slippor.Douban.Radio.BaseForm
{
    public class DoubanRadioFilterService : IFilterService
    {
        private readonly FilterCollection _filters;

        internal DoubanRadioFilterService(FilterCollection filters)
        {
            _filters = filters;
        }

        #region IFilterService Members

        public Dictionary<String, IFilter> Filters
        {
            get { return _filters; }
        }

        public void AddFilter(IFilter filter)
        {
            _filters.Add(filter.Name, filter);
        }

        public void RemoveFilter(IFilter filter)
        {
            _filters.Remove(filter.Name);
        }

        #endregion
    }
}